﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="xxhc.aspx.cs" Inherits="EmProductCenter.pxjd.xxhc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>线下会场培训预约</title>
    <script src="../js/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../js/login.js" type="text/javascript"></script>
    <script src="../js/main.js" type="text/javascript"></script>
    <link href="../css/common.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="../css/pxjd.css" type="text/css" />
</head>
<body>
    <script src="../js/header.js" type="text/javascript"></script>
    <div class="main">
        <div class="cpzx_main_caidan fr">
            <div class="cpzx_main_caidan1">
                <a href="default.aspx">在线视频</a></div>
            <div class="cpzx_main_caidan1">
                <a href="wlpxyy.aspx">网络培训预约</a></div>
            <div class="cpzx_main_caidan1">
                <a href="xxhc.aspx" class="color_blue">线下会场培训预约</a></div>
        </div>
        <div class="clear">
        </div>
        <div class="pt10">
            <div class="cpzx_main_tiaol fl">
            </div>
            <div class="cpzx_main_tiaom fl">
                <div class="fl">
                    <a href="../default.aspx">
                        <img src="../image/cx_home.jpg" width="22" height="27" /></a></div>
                <div class="cpzx_main_wenzi fl">
                    <a href="default.aspx" class="color_gray2 none">培训基地</a></div>
                <div class="cpzx_jiaoliu_jiantou fl">
                </div>
                <div class="cpzx_main_wenzi fl free_width">
                    <a href="xxhc.aspx" class="color_gray2 none">线下会场</a></div>
                <div class="cpzx_main_wenzi fr">
                    <a href="http://pay.emoney.cn/shopping0.aspx" target="_blank" class="color_blue none">我要购买</a></div>
                <div class="fr">
                    <img src="../image/cx_icon.jpg" width="38" height="27" /></div>
            </div>
            <div class="cpzx_main_tiaor fl">
            </div>
        </div>
        <div class="clear">
        </div>
        <!-- 线下培训预约 -->
        <div class="xxhc">
            <div class="search_bar">
                <span class=" txt white">课程快速查询</span>
                <div class="search_control">
                    <input type="text" class="master" value="请选择专家" onclick="ChangeType('dropdownlistTeach');"
                        id="search_teach_vale" />
                    <input type="text" class="month" value="月份" onclick="ChangeType('dropdownlistMonth');"
                        id="search_month_vale" />
                    <input type="text" class="area" value="请选择地区" onclick="ChangeType('dropdownlistLocation');"
                        id="search_location_vale" />
                </div>
                <div>
                    <a class="search_submit" href="javascript:void(0);
" onclick="SearchCourse();">提交搜索</a></div>
            </div>
            <div class="xxhc_main">
                <div class="left">
                    <div class="course_date">
                        <div class="month_select">
                            <div class="leftbtn" onmouseover="$(this).addClass('leftbtn_mouseover');" onmouseout="$(this).removeClass('leftbtn_mouseover');"
                                onclick="GetThisMonthCourse(1);">
                            </div>
                            <div class="rightbtn" onmouseover="$(this).addClass('rightbtn_mouseover');" onmouseout="$(this).removeClass('rightbtn_mouseover');"
                                onclick="GetThisMonthCourse(2);">
                            </div>
                            <p class="target_month" id="thisMonth">
                            </p>
                            <p>
                                上海课程预告
                            </p>
                        </div>
                        <table class="table_course" width="100%" border="0" cellspacing="0" cellpadding="0"
                            id="table_course">
                        </table>
                    </div>
                    <div class="course_info">
                        <table class="table_info" width="100%" border="0" cellspacing="0" cellpadding="0"
                            id="course_info">
                        </table>
                    </div>
                </div>
                <div class="right">
                    <div class="right_panel right_panel_1">
                        <%=strTopCourse %>
                    </div>
                    <div class="right_panel right_panel_2">
                        <p class="title">
                            全国精选课程推荐</p>
                        <div class="masters_faces">
                            <ul>
                                <%=strListTeach %>
                            </ul>
                        </div>
                        <div class="ca">
                        </div>
                    </div>
                </div>
                <div class="ca">
                </div>
            </div>
            <!-- dropdownlist begin-->
            <div class="dropdownlist master" style="display: none;" id="dropdownlistTeach">
                <%=strTeach%>
            </div>
            <div class="dropdownlist month" style="display: none;" id="dropdownlistMonth">
                <a href="javascript:void(0);">月份</a><a href="javascript:void(0);">7月</a> <a href="javascript:void(0);">
                    8月</a> <a href="javascript:void(0);">9月</a><a href="javascript:void(0);">10月</a>
            </div>
            <div class="dropdownlist area" style="display: none;" id="dropdownlistLocation">
                <a href="javascript:void(0);">请选择地区</a> <a href="javascript:void(0);">上海</a> <a href="javascript:void(0);">
                    大连</a> <a href="javascript:void(0);">北京</a> <a href="javascript:void(0);">天津</a>
                <a href="javascript:void(0);">南京</a>
            </div>
            <!-- dropdownlist end-->
        </div>
        <!-- 线下培训预约 end -->
    </div>
    <input type='hidden' id='hid_userName' runat="server" />
    <input type='hidden' id='hid_courseId' runat="server" />
    <!--弹出层 开始-->
    <!-- 用户登录过程-->
    <!-- 注册 --->
    <div class="login_panel rigster contentDiv" style="position: absolute; z-index: 9001;
        display: none;">
        <div class="panel_title">
            <p>
                欢迎加入益盟操盘手，注册只需15秒！或者<a href="javascript:void(0);" class="blue" onclick="CloseContentDiv(2);">登录</a></p>
            <a href="javascript:void(0);" class="panel_close" onclick="CloseContentDiv();">close</a></div>
        <div class="panel_content">
            <table width="468" border="0" cellspacing="8" cellpadding="0">
                <tr>
                    <td width="110" class="txt_right">
                        Email：
                    </td>
                    <td width="208">
                        <input type="text" id="regLoginName" maxlength="34" />
                    </td>
                    <td>
                        <span class="blue" id="regEmailMsg">请输入有效Email地址</span>
                    </td>
                </tr>
                <tr>
                    <td width="110" class="txt_right">
                        密码：
                    </td>
                    <td width="208">
                        <input type="password" id="regPW" maxlength="16" />
                    </td>
                    <td>
                        <span class="blue" id="regPWMsg">密码请用6-16个字符</span>
                    </td>
                </tr>
                <tr>
                    <td width="110" class="txt_right">
                        确认密码：
                    </td>
                    <td width="208">
                        <input type="password" id="regPWD" maxlength="16" />
                    </td>
                    <td>
                        <span class="red" id="regPWDMsg"></span>
                    </td>
                </tr>
                <tr>
                    <td width="110" class="txt_right">
                        联系方式：
                    </td>
                    <td width="208">
                        <input type="text" id="regMobile" maxlength="16" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td width="110" class="txt_right">
                        验证码：
                    </td>
                    <td width="208">
                        <input type="text" class="w_113" id="regCheckCode" maxlength="4" />&nbsp;&nbsp;<img
                            class="validate_code" src="../CheckCode.aspx" width="54" height="27" />
                    </td>
                    <td>
                        <span class="red" id="regCheckCodeMsg"></span>
                    </td>
                </tr>
                <tr>
                    <td width="110" class="txt_right">
                        &nbsp;
                    </td>
                    <td width="208">
                        请输入图中的字符
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td width="110" class="txt_right">
                        &nbsp;
                    </td>
                    <td width="208">
                        <div class="control submit">
                            <a href="javascript:void(0);" onclick="return SubRegister();">提&nbsp;&nbsp;交</a></div>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <!-- 注册 end --->
    <!-- 登录 登录名或密码错误！ --->
    <div class="login_panel login contentDiv" style="display: none;">
        <div class="panel_title">
            <a href="javascript:void(0);" class="panel_close" onclick="CloseContentDiv();">close</a></div>
        <div class="panel_content">
            <table width="350" border="0" cellspacing="8" cellpadding="0">
                <tr>
                    <td width="60" class="txt_right">
                    </td>
                    <td width="208">
                        <span class="red" id="loginMsg"></span>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td width="60" class="txt_right">
                        Email：
                    </td>
                    <td width="208">
                        <input type="text" id="loginName" maxlength="34" />
                    </td>
                    <td>
                        <span class="blue"></span>
                    </td>
                </tr>
                <tr>
                    <td width="60" class="txt_right">
                        密码：
                    </td>
                    <td width="208">
                        <input type="password" id="loginPW" maxlength="16" />
                    </td>
                    <td>
                        <span class=""><a href="javascript:void(0);" onclick="ResetPassWord();">忘记密码</a></span>
                    </td>
                </tr>
                <tr>
                    <td width="60" class="txt_right">
                        &nbsp;
                    </td>
                    <td width="208">
                        <div class="control submit">
                            <a href="javascript:void(0);" onclick="return GoLogin();">登&nbsp;&nbsp;录</a></div>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <!-- 登录 登录名或密码错误！ end --->
    <!-- 登录 忘记密码 该邮箱未注册！立即注册--->
    <div class="login_panel forget_pwd contentDiv" style="display: none;">
        <div class="panel_title">
            <a href="javascript:void(0);" class="panel_close" onclick="CloseContentDiv();">close</a></div>
        <div class="panel_content">
            <table width="350" border="0" cellspacing="8" cellpadding="0">
                <tr>
                    <td width="100" class="txt_right">
                    </td>
                    <td width="208">
                        <span class="red" id="resetMsg"></span>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td width="100" class="txt_right">
                        请输入邮箱地址：
                    </td>
                    <td width="208">
                        <input type="text" id="resetEmail" maxlength="50" />
                    </td>
                    <td>
                        <span class="blue"></span>
                    </td>
                </tr>
                <tr>
                    <td width="100" class="txt_right">
                        &nbsp;
                    </td>
                    <td width="208">
                        <div class="control submit">
                            <a href="javascript:void(0);" onclick="ResetPW();">重设密码</a></div>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <!-- 登录 忘记密码 该邮箱未注册！立即注册 end --->
    <!-- 登录 信息提示 --->
    <div class="login_panel alert_info contentDiv" style="display: none;">
        <div class="panel_title">
            <a href="javascript:void(0);" class="panel_close" onclick="CloseContentDiv();">close</a></div>
        <div class="panel_content">
            <span class="info_note">信息提示</span>
            <div class="info_main">
                取回密码的方法已通过Email发送到您的信箱中<br />
                请尽快修改您的密码！</div>
        </div>
        <div class="panel_footer">
            <p>
                <span id="sendTime">10</span>秒后页面跳转</p>
        </div>
    </div>
    <!-- 登录 信息提示 end --->
    <!-- 用户登录过程 end-->
    <!--  信息提示 --->
    <div class="login_panel alert_info contentDiv" style="display: none;">
        <div class="panel_title">
            <p class="blod">
                我要预约</p>
            <a href="javascript:void(0);" class="panel_close" onclick="CloseContentDiv();">close</a></div>
        <div class="panel_content">
            <span class="info_note">信息提示</span>
            <div class="info_main">
                课程预约验证码已发送到您的手机上，请及时查收！</div>
        </div>
        <div class="panel_footer">
            <p>
                <span id="regTime"></span>秒后页面跳转</p>
        </div>
    </div>
    <!-- 信息提示 end --->
    <!-- 预约 --->
    <div class="login_panel subscribe contentDiv" style="display: none;">
        <div class="panel_title">
            <p class="blod">
                我要预约</p>
            <a href="javascript:void(0);" class="panel_close" onclick="CloseContentDiv();">close</a></div>
        <div class="panel_content">
            <table width="350" border="0" cellspacing="8" cellpadding="0">
                <tr>
                    <td width="80" class="txt_right">
                    </td>
                    <td width="208">
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td width="80" class="txt_right">
                        我的姓名：
                    </td>
                    <td width="208">
                        <input type="text" id="reMyName" />
                    </td>
                    <td>
                        <span class="blue"></span>
                    </td>
                </tr>
                <tr>
                    <td width="80" class="txt_right">
                        手机号码：
                    </td>
                    <td width="208">
                        <input type="text" id="reMyMobile" />
                    </td>
                    <td>
                        <!--<span class=""><a href="#">忘记密码</a></span>-->
                    </td>
                </tr>
                <tr>
                    <td width="80" class="txt_right">
                        &nbsp;
                    </td>
                    <td width="208">
                        <div class="control submit">
                            <!--<a href="#">登&nbsp;&nbsp;录</a>-->
                            <a href="javascript:void(0);" onclick="return GetCode();">
                                <img src="../image/xxhc_img_btn.jpg" width="136" height="32" /></a></div>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <!-- 预约 end --->
    <!--  讲师介绍 master_introduce --->
    <div class="login_panel master_introduce contentDiv" style="display: none;">
        <div class="panel_title">
            <p class="txt_left">
                &nbsp;&nbsp;主讲专家介绍</p>
            <a href="javascript:void(0);" class="panel_close" onclick="CloseContentDiv();">close</a></div>
        <div class="panel_content">
            <div class="info_main" id="teachInfo">
            </div>
        </div>
        <div class="panel_footer" id="thisTeachCourse">
        </div>
    </div>
    <!-- 讲师介绍 master_introduce end --->
    <!--  课程简介 course_introduce --->
    <div class="login_panel course_introduce contentDiv" style="display: none;">
    </div>
    <!-- 课程简介 course_introduce end --->
    <div id="fullscreem" style="display: none; background-color: #F1F1F1; filter: alpha(opacity=50);
        opacity: 0.5; width: 100%; height: auto; position: absolute; top: 0px; left: 0px;
        z-index: 5;">
    </div>
    <!--弹出层 结束-->
    <script src="../js/footer.js" type="text/javascript"></script>
    <script type="text/javascript">
        $("#cpzx_top .head .menu .caidan a").eq(4).addClass("top_heard_show_menu");
        //打开讲师信息
        function OpenTeachInfo(lecturer) {
            var startDate = $.trim($("#thisMonth").html());
            $.ajax({
                type: "POST",
                url: "CourseInfo.ashx",
                dataType: "json",
                data: { action: "GetTeachHtml", lecturer: lecturer, startDate: startDate },
                success: function (result) {
                    $("#thisTeachCourse").html(result[0]);
                    $("#teachInfo").html(result[1]);
                    CloseContentDiv(7);
                }
            });
        }

        //打开课程信息
        function OpenCourseInfo(id) {
            $.ajax({
                type: "POST",
                url: "CourseInfo.ashx",
                dataType: "json",
                data: { action: "GetCourseHtml", id: id },
                success: function (result) {
                    $(".contentDiv").eq(7).html(result[0]);
                    CloseContentDiv(8);
                }
            });
        }

        //获取验证码
        function GetCode() {
            var reMyName = $.trim($("#reMyName").val());
            var reMyMobile = $.trim($("#reMyMobile").val());
            if (reMyName == "") {
                alert("姓名不能为空！");
                return false;
            }
            if (reMyMobile == "") {
                alert("手机号码不能为空！");
                return false;
            }
            var testMobile = new RegExp("^0{0,1}(13[0-9]|15[0-9]|180|147|182|18[4-9])[0-9]{8}$");
            if (!testMobile.test(reMyMobile)) {
                alert("手机码不正确，请重新输入");
                return false;
            }
            var loginName = $.trim($("#hid_userName").val());
            var id = $("#hid_courseId").val();
            $.ajax({
                type: "POST",
                url: "CourseInfo.ashx",
                dataType: "json",
                data: { action: "Reservation", loginName: loginName, id: id, isLine: 0, reMyName: reMyName, mobile: reMyMobile },
                success: function (result) {
                    if (result == "0") {
                        CloseContentDiv(5);
                        SendTime(5, "regTime", "");
                    }
                    else if (result == "-2")
                        alert("您已经预定过了！");
                    else
                        alert("系统忙，请稍候再试！");

                }
            });
        }

        //查询课程
        function SearchCourse() {
            var startDate = $.trim($("#search_month_vale").val());
            var location = $.trim($("#search_location_vale").val());
            var lecturer = $.trim($("#search_teach_vale").val());
            //$.post("xxhcxx.aspx", { lecturer: lecturer, location: location, startDate: startDate });
            var url = "xxhcxx.aspx?lecturer=" + lecturer + "&location=" + location + "&startDate=" + startDate;
            url = encodeURI(url);
            window.location.href = url;
        }
        //预约
        function Reservation(id) {
            var userName = $.trim($("#hid_userName").val());
            if (userName != "") {
                $("#hid_courseId").val(id);
                CloseContentDiv(6);
            }
            else {
                CloseContentDiv(2);
            }
        }
        //按日查询课程
        function GetThisDayCourse(d) {
            var startDate = $.trim($("#thisMonth").html()) + d + "日";
            if (d == null || d == "" || d == "undefined")
                startDate = "";
            var location = "";
            var lecturer = "";
            $.ajax({
                type: "POST",
                url: "CourseInfo.ashx",
                dataType: "json",
                data: { action: "GetThisDayCourse", lecturer: lecturer, location: location, startDate: startDate },
                success: function (result) {
                    $("#course_info").html(result[0]);
                }
            });
        }
        //按月查询课程
        function GetThisMonthCourse(preOrnext) {
            var startDate = $.trim($("#thisMonth").html());
            var location = "";
            var lecturer = "";
            $.ajax({
                type: "POST",
                url: "CourseInfo.ashx",
                dataType: "json",
                data: { action: "GetThisMonthCourse", lecturer: lecturer, location: location, startDate: startDate, preOrnext: preOrnext },
                success: function (result) {
                    $("#table_course").html(result[0]);
                    $("#thisMonth").html(result[1]);
                    $("#table_course td").mouseover(function () { $(this).addClass("bg1"); });
                    $("#table_course td").mouseout(function () { $(this).removeClass("bg1"); });
                }
            });
        }
        $(document).ready(function () {
            GetThisMonthCourse(0);
            GetThisDayCourse();
            CloseContentDiv();
            //讲师
            $("#dropdownlistTeach").mouseover(function () {
                $("#dropdownlistTeach").show();
            });
            $("#dropdownlistTeach").mouseout(function () {
                $("#dropdownlistTeach").hide();
            });
            //月份
            $("#dropdownlistMonth").mouseover(function () {
                $("#dropdownlistMonth").show();
            });
            $("#dropdownlistMonth").mouseout(function () {
                $("#dropdownlistMonth").hide();
            });
            //地区
            $("#dropdownlistLocation").mouseover(function () {
                $("#dropdownlistLocation").show();
            });
            $("#dropdownlistLocation").mouseout(function () {
                $("#dropdownlistLocation").hide();
            });

            //搜索讲师
            $search_teach = $("#dropdownlistTeach a");
            $search_teach.click(function () {
                var indexs = $search_teach.index($(this)[0]);
                $("#dropdownlistTeach").hide();
                $("#search_teach_vale").val($.trim($search_teach.eq(indexs).text()));
            });

            //搜索月份
            $search_month = $("#dropdownlistMonth a");
            $search_month.click(function () {
                var indexs = $search_month.index($(this)[0]);
                $("#dropdownlistMonth").hide();
                $("#search_month_vale").val($.trim($search_month.eq(indexs).text()));
            });

            //搜索地区
            $search_location = $("#dropdownlistLocation a");
            $search_location.click(function () {
                var indexs = $search_location.index($(this)[0]);
                $("#dropdownlistLocation").hide();
                $("#search_location_vale").val($.trim($search_location.eq(indexs).text()));
            });
        });
    </script>
<script src="../js/tongji.js" type="text/javascript"></script></body>
</html>
